import java.util.ArrayList;

public class ChonProduct {

	private String link;
	private String relId;
	private String retailPrice;
	private String msrp;
	private String discount;
	private ArrayList<String> images;

	public String getLink() {
		return link;
	}

	public void setLink(String link) {
		this.link = link;
	}

	public String getRelId() {
		return relId;
	}

	public void setRelId(String relId) {
		this.relId = relId;
	}

	public String getRetailPrice() {
		return retailPrice;
	}

	public void setRetailPrice(String retailPrice) {
		this.retailPrice = retailPrice;
	}

	public String getMsrp() {
		return msrp;
	}

	public void setMsrp(String msrp) {
		this.msrp = msrp;
	}

	public String getDiscount() {
		return discount;
	}

	public void setDiscount(String discount) {
		this.discount = discount;
	}

	public ArrayList<String> getImages() {
		return images;
	}

	public void setImages(ArrayList<String> images) {
		this.images = images;
	}

	public ChonProduct() {
		super();
		this.images = new ArrayList<String>();
	}

	@Override
	public synchronized boolean equals(Object obj) {
		// TODO Auto-generated method stub
		if (obj == null) {
			if (this == null) {
				return true;
			} else {
				return false;
			}
		}
		if (obj.getClass().equals(this.getClass())) {
			ChonProduct compareProduct = (ChonProduct) obj;
			if (this.link.contains(compareProduct.link)
					&& this.relId.contains(compareProduct.relId)
					&& this.discount.contains(compareProduct.discount)
					&& this.images.equals(compareProduct.images)
					&& this.msrp.contains(compareProduct.msrp)
					&& this.retailPrice.contains(compareProduct.retailPrice)) {
				return true;
			} else {
				return false;
			}

		} else {
			return false;
		}
	}

}
